package com.ruoyi.purchase.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * offers对象 offers
 *
 * @author hmy
 * @date 2025-08-22
 */
public class Offers extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** offer_id */
    @Excel(name = "offer_id")
    private Long offerId;

    /** product_id */
    private Long productId;

    /** product_name */
    private String productName;

    /** price */
    @Excel(name = "price")
    private BigDecimal price;

    /** quantity */
    @Excel(name = "quantity")
    private Long quantity;

    /** bonus */
    @Excel(name = "bonus")
    private BigDecimal bonus;

    /** expires_at */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date expiresAt;


    /** note */
    private String note;

    /** offer_name */
    @Excel(name = "offer_name")
    private String offerName;

    /** visibility */
    private String visibility;

    /** status */
    private String status;

    /** created_by */
    private String createdBy;

    /** created_at */
    private Date createdAt;

    /** updated_at */
    private Date updatedAt;

    /** 分组ID数组 */
    private Long[] groupIds;

    /** 用户ID列表 */
    private List<Long> userIds;

    // 在 Offers 类中添加新字段
    private Boolean notifyUsers;

    public Boolean getNotifyUsers() {
        return notifyUsers;
    }

    public void setNotifyUsers(Boolean notifyUsers) {
        this.notifyUsers = notifyUsers;
    }

    public Long[] getGroupIds() {
        return groupIds;
    }

    public void setGroupIds(Long[] groupIds) {
        this.groupIds = groupIds;
    }

    public List<Long> getUserIds() {
        return userIds;
    }

    public void setUserIds(List<Long> userIds) {
        this.userIds = userIds;
    }

    public void setOfferId(Long offerId)
    {
        this.offerId = offerId;
    }

    public Long getOfferId()
    {
        return offerId;
    }

    public void setProductId(Long productId)
    {
        this.productId = productId;
    }

    public Long getProductId()
    {
        return productId;
    }

    public void setProductName(String productName)
    {
        this.productName = productName;
    }

    public String getProductName()
    {
        return productName;
    }

    public void setPrice(BigDecimal price)
    {
        this.price = price;
    }

    public BigDecimal getPrice()
    {
        return price;
    }

    public void setQuantity(Long quantity)
    {
        this.quantity = quantity;
    }

    public Long getQuantity()
    {
        return quantity;
    }

    public void setBonus(BigDecimal bonus)
    {
        this.bonus = bonus;
    }

    public BigDecimal getBonus()
    {
        return bonus;
    }

    public void setExpiresAt(Date expiresAt)
    {
        this.expiresAt = expiresAt;
    }

    public Date getExpiresAt()
    {
        return expiresAt;
    }

    public void setNote(String note)
    {
        this.note = note;
    }

    public String getNote()
    {
        return note;
    }

    public void setOfferName(String offerName)
    {
        this.offerName = offerName;
    }

    public String getOfferName()
    {
        return offerName;
    }

    public void setVisibility(String visibility)
    {
        this.visibility = visibility;
    }

    public String getVisibility()
    {
        return visibility;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    public void setCreatedBy(String createdBy)
    {
        this.createdBy = createdBy;
    }

    public String getCreatedBy()
    {
        return createdBy;
    }

    public void setCreatedAt(Date createdAt)
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt()
    {
        return createdAt;
    }

    public void setUpdatedAt(Date updatedAt)
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt()
    {
        return updatedAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("offerId", getOfferId())
            .append("productId", getProductId())
            .append("productName", getProductName())
            .append("price", getPrice())
            .append("quantity", getQuantity())
            .append("bonus", getBonus())
            .append("expiresAt", getExpiresAt())
            .append("note", getNote())
            .append("offerName", getOfferName())
            .append("visibility", getVisibility())
            .append("status", getStatus())
            .append("createdBy", getCreatedBy())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
                .append("groupIds", getGroupIds())
                .append("userIds", getUserIds())
            .toString();
    }
}
